org.eclipse.vtp.desktop.projects.core.internals
Class BusinessObjectSet

java.lang.Object
  extended by org.eclipse.vtp.desktop.projects.core.internals.VoiceResource
      extended by org.eclipse.vtp.desktop.projects.core.internals.BusinessObjectSet
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IBusinessObjectSet, ObjectListener, IVoiceToolsResource

public class BusinessObjectSet
extends VoiceResource
implements IBusinessObjectSet

This is a concrete implementation of IBusinessObjectSet and provides the default behavior of that interface.

Version:
2.0
Author:
Trip Gilman

Constructor Summary
BusinessObjectSet(VoiceToolsDesignProject project, org.eclipse.core.resources.IFolder folder)
          Creates a new BusinessObjectSet with the given parent application project and eclipse folder resource.
 
Method Summary
 IBusinessObject createBusinessObject(java.lang.String name)
          Creates a new business object with the given name.
 void deleteBusinessObject(IBusinessObject businessObject)
          Removes the given business object from the application project.
 java.util.List getBusinessObjects()
           
 java.lang.String getName()
           
protected  java.lang.String getObjectId()
          The object id is used by the event system to uniquely identify a project resource.
 IVoiceToolsResource getParent()
          Returns the parent of this resource.
 
Methods inherited from class org.eclipse.vtp.desktop.projects.core.internals.VoiceResource
addRefreshListener, deferEvents, finalize, getAdapter, getProject, processObjectEvent, refresh, removeRefreshListener, resumeEvents
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.vtp.desktop.projects.core.IVoiceToolsResource
addRefreshListener, deferEvents, getProject, refresh, removeRefreshListener, resumeEvents
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

BusinessObjectSet

public BusinessObjectSet(VoiceToolsDesignProject project,
                         org.eclipse.core.resources.IFolder folder)
Creates a new BusinessObjectSet with the given parent application project and eclipse folder resource.

Parameters:
project - The parent application project
folder - The eclipse folder resource this business object set represents
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface IVoiceToolsResource
Returns:
The name of the resource

getObjectId

protected java.lang.String getObjectId()
Description copied from class: VoiceResource
The object id is used by the event system to uniquely identify a project resource. In this fashion, multiple references to the resource can be created and still be notified of events.

Specified by:
getObjectId in class VoiceResource
Returns:
A unique identifier for this resource

getParent

public IVoiceToolsResource getParent()
Description copied from interface: IVoiceToolsResource
Returns the parent of this resource. If this is a project resource this function returns this.

Specified by:
getParent in interface IVoiceToolsResource
Returns:
The parent of this resource resource

getBusinessObjects

public java.util.List getBusinessObjects()
Specified by:
getBusinessObjects in interface IBusinessObjectSet
Returns:
The list of IBusinessObjects used by the application project

createBusinessObject

public IBusinessObject createBusinessObject(java.lang.String name)
                                     throws org.eclipse.core.runtime.CoreException
Description copied from interface: IBusinessObjectSet
Creates a new business object with the given name. The business object will initially have no fields defined but all file and folder resources will be created as part of this action.

Specified by:
createBusinessObject in interface IBusinessObjectSet
Parameters:
name - The name of the new business object
Returns:
The created business object
Throws:
org.eclipse.core.runtime.CoreException - If an error occured during the creation of the required file and folder resources for the new business object

deleteBusinessObject

public void deleteBusinessObject(IBusinessObject businessObject)
Description copied from interface: IBusinessObjectSet
Removes the given business object from the application project. All business object related file and folder resources will automatically be removed as part of this action.

Specified by:
deleteBusinessObject in interface IBusinessObjectSet
Parameters:
businessObject - The business object to remove